package com.woniuxy.controller;

import com.woniuxy.entity.Hospitalization;

import com.woniuxy.entity.Withdrawal;
import com.woniuxy.service.HospitalizationService;
import com.woniuxy.util.PageParam;
import com.woniuxy.util.ResponseData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.math.BigDecimal;

@RestController
@RequestMapping("hos")
public class HospitalizationController {
    @Autowired
    private HospitalizationService hospitalizationService;
    @RequestMapping("queryAll")
    public ResponseData<?> queryAll(@RequestBody PageParam<Hospitalization> pageParam){
        return hospitalizationService.queryAll(pageParam);

    }
    @RequestMapping("queryTdeAll")
    public  ResponseData<?> queryTdeAll(){
        return  hospitalizationService.queryList();
    }
    @RequestMapping("payAdd")
    public  ResponseData<?> payAdd(@RequestBody Hospitalization hospitalization) throws InterruptedException {

        return  hospitalizationService.payAdd(hospitalization);

    }
    @RequestMapping("queryHosAll")
    public ResponseData<?> queryHosAll(@RequestBody PageParam<Hospitalization> pageParam){
        return hospitalizationService.queryHosAll(pageParam);

    }
    @RequestMapping("queryPatient")
    public  ResponseData<?> queryPatient(@RequestBody Hospitalization hospitalization){
        return hospitalizationService.queryPatient(hospitalization.getDwCaseId());
    }
}
